<extend name="_layout/main" />
<block name="head">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/assets/css/jasny-bootstrap.min.css" />
	<style type="text/css">
		#thumb~i,
		{
			display: none!important;
		}
	</style>
</block>
<block name="content">
	<div class="page-content">
		<div class="page-breadcrumbs">
			<ul class="breadcrumb">
				<li>
					<i class="fa fa-home"></i>
					<a href="{:U('dashboard/index')}">系统首页</a>
				</li>
				<li>
					<a href="javascript:;">链接管理</a>
				</li>
				<li class="active">添加链接</li>
			</ul>
		</div>
		<div class="page-body">
			<div class="row">
				<div class="col-xs-12 col-md-12">
					<div class="widget">
						<div class="widget-header">
							<span class="widget-caption">添加链接</span>
						</div>
						<div class="widget-body">
							<div>
								<div class="tabbable">
									<ul class="nav nav-tabs" id="myTab">
										<li class="active">
											<a data-toggle="tab" href="#home" aria-expanded="true">
                                                	基本信息
                                            </a>
										</li>

									</ul>
									<form role="form" class="form-horizontal" method="post" id="addForm" enctype="multipart/form-data">
										<div class="tab-content">
											<div id="home" class="tab-pane active">

												<div class="form-group ">
													<label for="site_name" class="col-sm-2 control-label no-padding-right">站点名称</label>
													<div class="col-xs-4">
														<input type="text" class="form-control" id="site_name" name="site_name">
													</div>
												</div>
                                                                                                <div class="form-group ">
													<label for="site_url" class="col-sm-2 control-label no-padding-right">站点URL</label>
													<div class="col-xs-4">
														<input type="text" class="form-control" id="site_url" name="site_url" value="http://">
													</div>
												</div>
												

											</div>
											

											<div class="row">
												<div class="col-sm-offset-2 col-sm-10">

													<button type="submit" class="btn btn-blue ladda-button " data-style="expand-right" id="submitBtn"> <span class="ladda-label">确认保存</span></button>
												</div>
											</div>
										</div>
									</form>
								</div>

							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</block>

<block name="footer">	
	<script src="__PUBLIC__/assets/js/validation/bootstrapValidator.js" type="text/javascript" charset="utf-8"></script>
	<script src="__PUBLIC__/assets/js/select2/select2.js"></script>
	<script src="__PUBLIC__/assets/js/jasny-bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="__PUBLIC__/assets/js/jquery.form.js" type="text/javascript" charset="utf-8"></script>
	<script src="/Public/assets/js/template-min.js" type="text/javascript" charset="utf-8"></script>

	<script type="text/javascript">
    	$("#addForm").bootstrapValidator({              
    	                excluded: [':disabled'],
    	                feedbackIcons: {
    	                    valid: 'glyphicon glyphicon-ok',
    	                    invalid: 'glyphicon glyphicon-remove',
    	                    validating: 'glyphicon glyphicon-refresh'
    	                },
    	                submitHandler: function (validator, form, submitButton) {
    	                    validator.defaultSubmit();
    	                },
    	                fields: {
    	                    site_name: {
    	                        validators: {
    	                            notEmpty: {
    	                                message: '站点名不能为空'
    	                            }
    	                        }
    	                    },
                            site_url: {
    	                        validators: {
    	                            notEmpty: {
    	                                message: '站点Url不能为空'
    	                            }
    	                        }
    	                    }
    	                }
    	            });  
    </script>
</block>